home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekkan Dennou Club 145
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z
/
Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin
/
tools
/
sharp
/
sxwork2.lzh
/
サンプル基礎編
/
タスク間通信
/
COMM.H
< prev
next >
Wrap
Text File
|
1994-03-10
|
2KB
|
70 lines
/******************************************************************************
* comm.h: comm.c用ヘッダファイル
******************************************************************************
* Workroom SX-68K Sample Program Copyright 1994 SHARP
*
* 定数定義
*/
/* ウィンドウタイトル */
#define WINTITLE ((_LASCII) "\x0cタスク間通信")
/* ウィンドウサイズ */
#define WIN_H 280 /* ウィンドウの幅 */
#define WIN_V 85 /* ウィンドウの高さ */
/* テキスト入力欄のタイトル表示位置 */
#define TTL_X 20 /* X座標 */
#define TTL_Y 10 /* Y座標 */
/* テキスト入力欄の表示位置 */
#define LLENGTH 40 /* 1行の文字数 */
#define LENMAX (LLENGTH * 2) /* 入力最大文字数 */
#define TXT_L TTL_X /* 左端座標 */
#define TXT_T (TTL_Y + 15) /* 上端座標 */
#define TXT_R (TXT_L + 6 * LLENGTH) /* 右端座標 */
#define TXT_B (TXT_T + 12 * 2) /* 下端座標 */
/* 文字ボタンの表示位置(右下座標) */
#define CHR_X (TXT_R - 6) /* X座標 */
#define CHR_Y (WIN_V - 6) /* Y座標 */
/* システムイベントの種類 */
#define MESSAGE 128 /* メッセージの送信 */
/* イベントマスク */
#define EVENTMASK (EM_MSLDOWN | EM_MSRDOWN | EM_UPDATE | EM_ACTIVATE | EM_SYSTEM1 | EM_SYSTEM2)
/*
* 構造体宣言
*/
typedef struct ComVal { /* 共通変数 */
Window *windowPtr; /* ウィンドウポインタ */
BOOLEAN activeFlag; /* アクティブフラグ */
TsEvent event; /* イベントレコード */
int eventMask; /* イベントマスク */
int errorCode; /* エラーコード */
BOOLEAN endFlag; /* 終了フラグ */
Control **chrBtnHdl; /* 文字ボタンのコントロールハンドル */
TEdit **tEditHdl; /* テキストエディットハンドル */
char **sendStr; /* 送信文字列のハンドル */
} ComVal;
/*
* 関数プロトタイプ
*/
/* comm.c */
BOOLEAN init(ComVal *);
BOOLEAN createWindow(ComVal *);
BOOLEAN createControl(ComVal *);
BOOLEAN createText(ComVal *);
void idleEvent(ComVal *);
void msLDownEvent(ComVal *);
void checkControl(ComVal *);
void msRDownEvent(ComVal *);
void keyDownEvent(ComVal *);
void updateEvent(ComVal *);
void drawGraph(ComVal *);
void activateEvent(ComVal *);
void systemEvent(ComVal *);
void showErrDialog(ComVal *);
void endProc(int, ComVal *);
void sendMessage(ComVal *);